-- GENERATED SPELL FOR [Arcatraz Warder] --


function spell0_20859(pUnit, Event) --@Arcane Shot,n/a--
pUnit:FullCastSpellOnTarget(36609,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20859', 0, 1)
end

function spell1_20859(pUnit, Event) --@Arcane Shot,n/a--
pUnit:FullCastSpellOnTarget(38807,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20859', 574, 1)
end

function spell2_20859(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20859', 593, 1)
end

function spell3_20859(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20859', 577, 1)
end

function Sorts_20859(pUnit, Event)
local choix_sorts_20859 = math.random(0, 3)
if choix_sorts_20859 == 0 then
pUnit:RegisterEvent('spell0_20859', 1, 1)
end
if choix_sorts_20859 == 1 then
pUnit:RegisterEvent('spell1_20859', 1, 1)
end
if choix_sorts_20859 == 2 then
pUnit:RegisterEvent('spell2_20859', 1, 1)
end
if choix_sorts_20859 == 3 then
pUnit:RegisterEvent('spell3_20859', 1, 1)
end
end

function mob20859_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20859', math.random(1500, 3000), 1)
end

function mob20859_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20859_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20859_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20859, 1, 'mob20859_Action')
RegisterUnitEvent(20859, 2, 'mob20859_Leave')
RegisterUnitEvent(20859, 3, 'mob20859_Kill')
RegisterUnitEvent(20859, 4, 'mob20859_Die')
